package hanqi.mangement.Service;

import hanqi.mangement.Mapper.courseMapper;
import hanqi.mangement.entity.course;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class courseserviceImpl implements courseservice{

    @Autowired
    private courseMapper coursemapper;
    @Override
    public List<course> listAll() {
        return coursemapper.selectList(null);
    }

    @Override
    public course getById(int courseId) {
        return coursemapper.selectById(courseId);
    }

    @Override
    public void addCourse(course course) {
               coursemapper.insert(course);
    }
}
